﻿//===============================================================================
// Microsoft patterns & practices Enterprise Library Contribution
// Query Application Block
//===============================================================================

using System.Management.Instrumentation;
using Microsoft.Practices.EnterpriseLibrary.Common.Configuration.Manageability;

namespace EntLibContrib.Query.Configuration.Manageability.Queries
{
	/// <summary>
	/// Represents the configuration information for an instance of
	/// <see cref="EntLibContrib.Query.Configuration.FileQueryData"/>.
	/// </summary>
	/// <seealso cref="EntLibContrib.Query.Configuration.QueryData"/>
	/// <seealso cref="EntLibContrib.Query.Configuration.QueryDataBase"/>
	/// <seealso cref="NamedConfigurationSetting"/>
	/// <seealso cref="ConfigurationSetting"/>
	[ManagementEntity]
	public abstract class FileQuerySetting : QuerySetting
	{
		#region Fields
		private string dataFile;
		#endregion

		#region Properties
		/// <summary>
		/// Gets or sets the data file.
		/// </summary>
		/// <value>The data file.</value>
		[ManagementConfiguration]
		public string DataFile
		{
			get { return dataFile; }
			set { dataFile = value; }
		}
		#endregion

		#region Construction
		/// <summary>
		/// Initializes a new instance of the <see cref="FileQuerySetting"/> class.
		/// </summary>
		/// <param name="sourceElement">The source element.</param>
		/// <param name="name">The name.</param>
		/// <param name="customCommandName">Name of the custom command.</param>
		/// <param name="parameterSetName">Name of the parameter set.</param>
		/// <param name="dataFile">The data file.</param>
		protected FileQuerySetting(FileQueryData sourceElement, string name, string customCommandName, string parameterSetName, string dataFile)
			: base(sourceElement, name, customCommandName, parameterSetName)
		{
			this.dataFile = dataFile;
		}
		#endregion
	}
}
